package com.t.bricks.bussiness.db.dao.flowwork;

import com.t.bricks.bussiness.db.dao.common.BaseDao;
import com.t.bricks.bussiness.db.entity.flowwork.FlowWork;
import com.t.bricks.model.MsgEmity;

public interface FlowWorkDao<T> extends BaseDao<T> {
	
	/**
	 * 创建流程实例(并创建流程节点)
	 * @Param flowWork
	 * @param sInitiateDescription 发起节点的描述
	 * @return MsgEmity
	 */
	MsgEmity createWork(FlowWork flowWork, String sInitiateDescription);

	/**
	 * 删除
	 * @Param id 记录编号
	 * @Param iVersion 数据版本号
	 * @return MsgEmity
	 */
	MsgEmity delWork(String uId, Integer iVersion);

	/**
	 * 修改状态
	 * @param uId 编号
	 * @param iState 状态值
	 * @param iVersion 记录版本号
	 * @param sMemo 备注
	 * @return MsgEmity 返回执行情况
	 */
	MsgEmity changeState(String uId, Integer iState, Integer iVersion, String sMemo);

}
